<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>单行文本</title>
    <style type="text/css">
      body {
      font-size:12px;
      margin: 0px;
      background-color:#F0F0EE;
      overflow: hidden;
      }
      td {
      font-size:12px;
      padding: 3px;
      }
     
    </style>
    <script type="text/javascript" src="../../../js/jquery.js"></script>
	<script type="text/javascript">
		var KE = parent.KE;
		location.href.match(/\?id=([\w-]+)/i);
		var id = RegExp.$1;
		var temp = "";
		KE.event.ready(function() {
			var Oname = KE.$('Oname', document);
			var OengName = KE.$('OengName', document);
			var Oinit = KE.$('Oinit', document);
			var Otype = KE.$('Otype', document);
			var OfieldType = KE.$('OfieldType', document);
			var display = KE.$('display',document);
			var order_;
			var g = KE.g[id];  
			var startNode =g.keRange.startNode;
			if(startNode.name!=undefined){
				temp = startNode.name;
				OengName.value=startNode.name;
				if(startNode.getAttribute("title")!=undefined)Oname.value=startNode.getAttribute("title");
				if(startNode.type!=undefined)Otype.value=startNode.type;
				if(startNode.getAttribute("value")!=null)Oinit.value=startNode.getAttribute("value");
				if(startNode.getAttribute("dataType")!=undefined)OfieldType.value=startNode.getAttribute("dataType");
				if(startNode.getAttribute("readOnly")!=undefined && startNode.getAttribute("readOnly")!=null&& startNode.getAttribute("readOnly")){$("#readOnly").attr("checked","checked");}
				if(startNode.getAttribute("display")!=undefined && startNode.getAttribute("display")=='true'){
					display.checked = true;
					$("#displaytip").show();
				}else{
					$("#displaytip").hide();
				}
				order_ = startNode.getAttribute("order");
			}
				order(order_);

				if(KE.lang["formMode"] == "develop" ){
					develop();
				}
		}, window, document);


		function order(index){
			for(var i=0;i<30;i++){
				if(index==i){
					$("<option value='"+i+"' selected='selected' >"+i+"</option>").appendTo($("#displayorder"));
				}else{
					$("<option value='"+i+"'>"+i+"</option>").appendTo($("#displayorder"));
				}
			}
		}

		function display(){
		//	$("#displaytip").toggle();
		}

		function change(obj){
			if($(obj).val()=="自定义"){
				$("#Oinit").attr("value","");
				$("#Oinit").show();
			}else{
				$("#Oinit").hide();
				$("#Oinit").attr("value",$(obj).val());
			}
		}


		function develop(){
			$("#en_name").hide();
		}

		function isPassword(value){
			if(value=='password'){
				$("#display_tr").hide();
				$("#displaytip").hide();
				$("#display").attr("checked",false);
			}else{
				$("#display_tr").show();
				$("#displaytip").show();
			}
		}
	</script>
  </head>
  <body>
     <table border="0" cellpadding="0" cellspacing="0">
     
      <tr id="en_name" >
      		<td align="right">字段名称：</td>
      		<td><input  type="text" name="OengName" id="OengName" value="" maxlength="20"/></td>
      		<td>字段名由英文母开始,数字和下划线组成.</td>
      </tr>
      <tr>
      		<td align="right">标题：</td>
      		<td><input  type="text" name="Oname" id="Oname" value="" maxlength="50"/></td> 
      		<td>非空且不能包含英文的"()[]"</td>
     </tr>
      <tr>
      		<td align="right">初始值：</td>
      		<td style="margin: 0;padding: 0">
      			<table style="margin: 0;padding: 0">
      				<tr style="margin: 0;padding: 0">
      					<td style="margin: 0;padding: 0">
      						<input type="text" name="Oinit" id="Oinit" value="" maxlength="255"/>
      					</td>
      					<td style="margin: 0;padding: 0"></td>
      				</tr>
      			</table>
      		</td>
      		<td>字段类型为整数和小数时初始值必须为数字</td>
      </tr>
     <tr>
     	<td align="right">字段类型：</td>
     	<td>
     		<select id="OfieldType" name="OfieldType">
   				<option value="TEXT">文本</option>
   				<option value="NUMBER">整数</option>
   				<option value="AMOUNT">小数</option>
   			</select>
     	</td>
     </tr>
     <tr>
     	<td align="right">输入框类型：</td>
     	<td>
   			<select id="Otype" name="Otype" onchange="isPassword(this.value);">
   				<option value="text">文本</option>
   				<option value="password">密码</option>
   			</select>
   		</td>
     </tr>
     <tr id="display_tr" style="display: block;">
     	<td align="right">列表显示：</td>
     	<td><input  name="display" id="display" type="checkbox" value="1"/>在列表中显示 </td>
     	<td></td>
     </tr>
      <tr id="displaytip" style="display: block;">
     	<td align="right">显示位置：</td>
     	<td>第<select id="displayorder"></select>列 </td>
     	<td></td>
     </tr>
     <tr>
     	<td align="right">只读属性设置：</td>
     	<td><input name="readOnly" id="readOnly" type="checkbox"/>只读 </td>
     	<td></td>
     </tr>
    </table>
  </body>
</html>
